using System;
using HCP.Responses;
using HCP.SimpleJSON;

namespace HCP.Requests
{
	public class OpenPopup : JobRequest
	{
		public OpenPopup(JSONClass json) : base(json)
		{
		}

		public string PopupName
		{
			get
			{
				return base.Data["popup"];
			}
		}

		public override JobResponse Process()
		{
			bool flag = Scene.ShowPopup(this.PopupName, null, null);
			if (flag)
			{
				return new StringResponse(Scene.CurrentPopup().name);
			}
			return new StringResponse("Popup Open failed");
		}
	}
}
